#pragma once

#include <DirectXMath.h>

#include "Camera.h"
#include "D3DFramework.h"
#include "Light.h"
#include "Sky.h"
#include "Spheres.h"

struct ID3D10BlendState;

namespace D3D10
{
	class MainApplication : public D3DFramework
	{
	public:
		MainApplication(const HINSTANCE hInstance);
		~MainApplication();
	
		void init();
		void onResize();
		void updateScene(const float deltaTime);
		void drawScene(); 

        LRESULT msgProc(unsigned __int32 msg, WPARAM wParam, LPARAM lParam);
	
	private:
		void initEffect();
		void initInputLayout();
		void initLights();

        void restoreDefaultStates();
        
        void updateCamera(const float deltaTime);
	
	private:	
        D3D10Geometry::Sky mSky;
        D3D10Geometry::Spheres mSpheres;
                
        D3D10Utils::DirectionalLight mDirectionalLight;

		DirectX::XMFLOAT3A mEyePosition;		
		
        POINT mOldMousePosition;
	};
}
